//https://leetcode.cn/problems/6CE719/?envType=daily-question&envId=2024-06-21
class Solution {
public:
    int temperatureTrend(vector<int>& temperatureA, vector<int>& temperatureB) {
        int ret = 0;
        int tmp = 0;
        for(int i = 1;i < temperatureA.size();i++){
            bool t = true;
            if(temperatureA[i]>temperatureA[i-1] &&temperatureB[i]>temperatureB[i-1])
            {
                ;
            }
            else if(temperatureA[i]==temperatureA[i-1] &&temperatureB[i] == temperatureB[i-1])
            {
                ;
            }
            else if(temperatureA[i]<temperatureA[i-1] &&temperatureB[i] < temperatureB[i-1])
            {
                ;
            }else{
                t = false;
                ret = max(ret,tmp);
                tmp = 0;
            }
            if(t){
                tmp++;
            }
        }
        return max(ret,tmp);
    }
};